package com.yonyou.cyxdms.sysAuth.service.controller;

import com.yonyou.cyxdms.sysAuth.service.dto.CompanyDTO;
import com.yonyou.cyxdms.sysAuth.service.dto.EquityDto;
import com.yonyou.cyxdms.sysAuth.service.service.impl.EquityStructureService;
import com.yonyou.cyxdms.sysAuth.service.service.manage.company.CompanyService;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author <a href="https://www.fengwenyi.com?code">Erwin Feng</a>
 * @since 2022-06-14
 */
@RestController
@RequestMapping("/equityStructure")
public class EquityStructureController {

    @Autowired
    EquityStructureService equityStructureService ;

    @GetMapping(value="/selectByCompanyId/{companyId}")
    @ApiOperation(value = "根据公司id查询股权信息", notes = "根据公司id查询股权信息", httpMethod = "GET")
    @ApiImplicitParams({@ApiImplicitParam(value = "公司id", name = "companyId", required = true, dataType = "string", paramType = "header")})
    public List<EquityDto> selectByCompanyId(@PathVariable("companyId") Integer companyId) {
        return equityStructureService.selectByCompanyId(companyId);
    }
}
